package com.wantup.demo03xd.part05.communication.demo6;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 2019/7/3 15:27
 */
public class Consumer implements Runnable {

    private Medium medium;

    public Consumer(Medium medium) {
        this.medium = medium;
    }

    public Medium getMedium() {
        return medium;
    }


    @Override
    public void run() {
        while (true) {
            medium.take();
        }
    }
}
